- return unless show_new_user_signups_cap_reached?

- user_cap_help_url = help_page_path('administration/settings/sign_up_restrictions.md')
- help_link_start = '<a class="gl-link" href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: user_cap_help_url }
- help_link_end = '</a>'.html_safe

%div{ class: [container_class, @content_class, 'gl-pt-5!'] }
  = render Pajamas::AlertComponent.new(variant: :warning,
    title: s_('Admin|Your instance has reached its user cap'),
    alert_options: { class: 'js-new-user-signups-cap-reached',
                     data: { feature_id: ::EE::Users::CalloutsHelper::NEW_USER_SIGNUPS_CAP_REACHED,
                             dismiss_endpoint: callouts_path,
                             defer_links: "true" }}) do |c|
    - c.with_body do
      = s_('Admin|Additional users must be reviewed and approved by a system administrator. Learn more about %{help_link_start}usage caps%{help_link_end}.').html_safe % { help_link_start: help_link_start, help_link_end: help_link_end }
    - if User.blocked_pending_approval.count > 0
      - c.with_actions do
        = link_button_to s_('Admin|View pending user approvals'), admin_users_path({ filter: 'blocked_pending_approval' }), class: 'gl-alert-action', variant: :confirm
